//
//  DCSendingTableViewCell.m
//  JiuyaoMotorcade
//
//  Created by 大橙子 on 2018/11/29.
//  Copyright © 2018 Tomous. All rights reserved.
//

#import "DCSendingTableViewCell.h"

@implementation DCSendingTableViewCell
+(instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *CellID = @"Cell";
    DCSendingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellID];
    if (cell == nil) {
        cell = [[DCSendingTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpBaseCellUI];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    [self setUpLayoutSubviews];
}
-(void)setModel:(DCOrderReceiveOddModel *)model
{
    _model = model;
    
    self.startLabel.textLabel.text = model.startCity;
    self.extractLabel.textLabel.text = [model.startAddress cutStrWithLength:10];
    self.endLabel.textLabel.text = model.endCity;
    self.sendLabel.textLabel.text = [model.endAddress cutStrWithLength:10];
    
    self.carLabel.textLabel.text = @"新车";
    self.totalNumLabel.text = [NSString stringWithFormat:@"%@辆",model.totalNumber];
    self.numLabel.attributedText = [YLAttributedStr changNumberColorWithTotalString:[NSString stringWithFormat:@"(SUV%@CAR%@)",model.suvNumber,model.carNumber] andColor:BlueColor];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
